.fullScreenLayout {
  height: 100vh;
  width: 100vw;
  display: flex;
  flex-direction: column;
  background: #f0f2f5;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
}

.header {
  background-color: #fff;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  padding: 0;
  position: sticky;
  top: 0;
  z-index: 100;
}

.pageHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 24px;
  height: 40px;
}

.headerLeft {
  display: flex;
  align-items: center;
  gap: 8px;
}

.headerCenter {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
}

.headerRight {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.navButton {
  margin-right: 8px;
}

.actionButtons {
  display: flex;
  gap: 4px;
  justify-content: center;
}

.actionButton {
  margin-right: 0;
}

.submitButton {
  background-color: #1890ff;
}

.userButton {
  display: flex;
  align-items: center;
  gap: 8px;
}

.userName {
  margin-left: 8px;
}

.headerLeft :global(.ant-btn),
.headerRight :global(.ant-btn) {
  background: #fff;
  border-color: #d9d9d9;
}

.headerLeft :global(.ant-btn:hover),
.headerRight :global(.ant-btn:hover) {
  background: #ffffff;
  border-color: #1890ff;
  color: #1890ff;
}

.headerCenter :global(.ant-btn-primary) {
  background: #1890ff;
  border-color: #1890ff;
  color: #fff;
}

.headerCenter :global(.ant-btn-primary:hover) {
  background: #40a9ff;
  border-color: #40a9ff;
}

.headerCenter :global(.ant-btn-primary:first-child) {
  background: #52c41a;
  border-color: #52c41a;
}

.headerCenter :global(.ant-btn-primary:first-child:hover) {
  background: #73d13d;
  border-color: #73d13d;
}

.headerCenter :global(.ant-select-selector) {
  background: #fff !important;
}

.content {
  flex: 1;
  padding: 5px;
  overflow: hidden;
  background-color: #f5f5fa;
  display: flex;
  height: calc(100vh - 48px);
}

.problemSection {
  height: 100%;
  min-width: 100px;
  max-width: calc(100% - 100px);
  transition: all 0.3s ease;
}

.problemSection.collapsed {
  min-width: 5px !important;
  width: 5px !important;
  max-width: 5px !important;
}

.editorSection {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 300px;
  height: 100%;
  gap: 16px;
  transition: all 0.3s ease;
}

.card {
  height: 100%;
}

.card :global(.ant-card-head) {
  padding: 0 16px;
  min-height: 48px;
  background: #fafafa;
  border-bottom: 1px solid #f0f0f0;
}

.cardTitle {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.cardTitleLeft {
  display: flex;
  align-items: center;
}

.cardTitleLeft span {
  font-size: 14px;
  font-weight: 500;
  color: #1f1f1f;
}

.cardTitleLeft :global(.ant-select) {
  margin-left: 16px;
}

.cardTitleLeft :global(.ant-select-selector) {
  border-color: #d9d9d9 !important;
  background: #fff !important;
}

.cardTitleLeft :global(.ant-select:hover .ant-select-selector) {
  border-color: #40a9ff !important;
}

.cardActions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.dragHandle {
  cursor: move;
  color: #999;
}

.dragHandle:hover {
  color: #1890ff;
}

.card :global(.ant-card-body) {
  flex: 1;
  overflow: auto;
  padding: 16px;
}

.editorSection .card {
  transition: height 0.3s;
}

.card.collapsed {
  height: 48px !important;
}

.card.collapsed :global(.ant-card-body) {
  display: none;
}

.resizer {
  width: 4px;
  background-color: transparent;
  cursor: col-resize;
  transition: background-color 0.2s;
}

.horizontalResizer {
  height: 4px;
  background-color: transparent;
  cursor: row-resize;
  transition: background-color 0.2s;
}

.resizer:hover,
.horizontalResizer:hover,
.isResizing {
  background-color: #1890ff;
}

.resultContent {
  height: 100%;
  overflow: auto;
  padding: 16px;
}

.problemCard {
  height: 100%;
  border-radius: 8px;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.problemContent {
  padding: 0;
  overflow-y: auto;
  height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
}

/* 适配移动端 */
@media (max-width: 768px) {
  .content {
    flex-direction: column;
    padding: 8px;
  }

  .problemSection {
    width: 100% !important;
    height: 40vh;
    min-width: unset;
    max-width: unset;
  }

  .resizer,
  .horizontalResizer {
    display: none;
  }

  .editorSection {
    width: 100%;
    height: 60vh;
    min-width: unset;
  }

  .card {
    max-height: none !important;
  }
}

.submitPage {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

.topNav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 16px;
  height: 50px;
  background-color: #f5f5f5;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  z-index: 10;
}

.leftNav {
  display: flex;
  align-items: center;
}

.logo {
  font-size: 20px;
  font-weight: bold;
  margin-right: 24px;
}

.logo a {
  color: #333;
  text-decoration: none;
}

.navLinks {
  display: flex;
  align-items: center;
  gap: 8px;
}

.navLinks a {
  margin-right: 16px;
  color: #333;
  text-decoration: none;
}

.centerNav {
  display: flex;
  gap: 16px;
}

.rightNav {
  display: flex;
  align-items: center;
}

.mainContent {
  display: flex;
  flex: 1;
  overflow: hidden;
}

.problemPanel {
  width: 40%;
  overflow-y: auto;
  border-right: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.codePanel {
  width: 60%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.editorPanel {
  flex: 1;
  overflow: hidden;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-direction: column;
}

.resultPanel {
  height: 30%;
  overflow-y: auto;
}

.panelHeader {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 16px;
  background-color: #f9f9f9;
  border-bottom: 1px solid #eee;
}

.panelTitle {
  font-weight: bold;
}

.panelActions {
  display: flex;
  gap: 8px;
}

.panelContent {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}

.problemTitle {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
}

.problemDifficulty {
  margin-left: 8px;
}

.problemInfo {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  color: #666;
}

.problemDescription {
  margin-bottom: 16px;
}

.sampleSection {
  margin-bottom: 16px;
}

.sampleTitle {
  font-weight: bold;
  margin-bottom: 8px;
}

.sampleBox {
  background-color: #f5f5f5;
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  margin-bottom: 8px;
  white-space: pre-wrap;
}

.maximized {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: calc(100vh - 40px) !important;
  z-index: 100;
  border-radius: 0 !important;
}

.hidden {
  display: none;
}

.collapseButton {
  cursor: pointer;
  color: #666;
}

.collapseButton:hover {
  color: #1890ff;
}

.resultInfo {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
}

.errorInfo {
  background-color: #fff2f0;
  border: 1px solid #ffccc7;
  padding: 12px;
  border-radius: 4px;
  font-family: monospace;
  white-space: pre-wrap;
  overflow-x: auto;
}

.testCaseResult {
  margin-top: 16px;
}

.testCaseTable {
  width: 100%;
  border-collapse: collapse;
}

.testCaseTable th, .testCaseTable td {
  border: 1px solid #eee;
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
}

.outputText {
  white-space: pre-wrap !important;
  word-break: break-word !important;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace !important;
  font-size: 12px !important;
  line-height: 1.4 !important;
  margin: 0 !important;
  background-color: #f8f9fa;
  padding: 4px 6px;
  border-radius: 3px;
  max-height: 200px;
  overflow-y: auto;
}

.testCaseTable th {
  background-color: #f5f5f5;
}

.problemTags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.problemHint {
  margin-top: 24px;
  padding: 12px;
  background-color: #f0f9ff;
  border-radius: 4px;
}

.problemNavigation {
  display: flex;
  justify-content: space-between;
  margin-bottom: 16px;
}

.languageSelector {
  width: 120px;
}

.fullHeight {
  height: 100%;
}

/* 整体布局 */
.layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
}

/* 卡片容器 */
.cardsContainer {
  display: flex;
  width: 100%;
  height: 100%;
  gap: 0;
  padding: 8px;
}

.cardWrapper {
  border-radius: 8px;
  overflow: hidden;
  transition: all 0.3s ease;
  background-color: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.problemCardWrapper {
  max-width: none;
  transition: all 0.3s ease;
  height: 100%;
  margin-right: 6px;
}

.problemCardWrapper.collapsed {
  max-width: 36px;
  width: 36px !important;
  flex: 0 0 36px !important;
  height: auto !important;
}

/* 确保CollapsibleTabCard在折叠状态下高度自适应 */
.problemCardWrapper.collapsed .cardWrapper {
  height: auto !important;
  min-height: auto !important;
}

.rightCards {
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
  transition: all 0.3s ease;
  margin-left: 6px;
}

.editorCardWrapper {
  flex: 2;
  min-height: 300px;
  transition: all 0.3s ease;
}

.editorCardWrapper.collapsedUp, .editorCardWrapper.collapsedDown {
  flex: 0 0 36px;
  min-height: 36px;
}

.resultCardWrapper {
  flex: 1;
  min-height: 200px;
  transition: all 0.3s ease;
}

.resultCardWrapper.collapsedDown, .resultCardWrapper.collapsedUp {
  flex: 0 0 36px;
  min-height: 36px;
}

/* 当编辑器折叠时，结果卡片自动占满空间 */
.editorCardWrapper.collapsedUp ~ .resultCardWrapper,
.editorCardWrapper.collapsedDown ~ .resultCardWrapper {
  flex: 1;
  min-height: calc(100% - 48px);
}

/* 卡片状态 - 这些类仅用于包装器，实际卡片样式由CollapsibleCard组件控制 */
.maximized {
  position: fixed;
  top: 40px;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100% !important;
  height: calc(100vh - 40px) !important;
  z-index: 100;
  border-radius: 0 !important;
}

.collapsedLeft {
  width: 40px !important;
  min-width: 40px !important;
  overflow: hidden;
}

.collapsedDown {
  height: 36px !important;
  min-height: 36px !important;
  overflow: hidden;
}

.collapsedUp {
  height: 36px !important;
  min-height: 36px !important;
  overflow: hidden;
}

/* 卡片样式 */
.problemCard,
.editorCard,
.resultCard {
  height: 100%;
  border-radius: 8px;
  padding: 0;
}

/* 题目内容样式 */
.problemContent {
  padding: 0;
  overflow-y: auto;
  height: 100%;
}

.tabs {
  height: 100%;
}

.tabs :global(.ant-tabs-content) {
  height: 100%;
  padding: 0;
}

.tabs :global(.ant-tabs-tabpane) {
  height: 100%;
  overflow-y: auto;
  padding: 16px;
}

.submissionsPlaceholder {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  color: #999;
}

.problemTitle {
  font-size: 20px;
  font-weight: bold;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.problemDifficulty {
  margin-left: 8px;
}

.problemInfo {
  display: flex;
  gap: 16px;
  margin-bottom: 16px;
  color: #666;
}

.problemTags {
  margin-bottom: 16px;
}

.problemDescription {
  margin-bottom: 16px;
}

.sampleSection {
  margin-bottom: 16px;
}

.sampleTitle {
  font-weight: bold;
  margin-bottom: 8px;
}

.sampleBox {
  background-color: #f5f5f5;
  padding: 8px;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 16px;
}

.problemHint {
  background-color: #fffbe6;
  padding: 16px;
  border-radius: 4px;
  border: 1px solid #ffe58f;
}

/* 编辑器内容样式 */
.editorContent {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editorToolbar {
  padding: 8px 16px;
  border-bottom: 1px solid #f0f0f0;
}

.languageSelector {
  width: 120px;
}

.editorWrapper {
  flex: 1;
  overflow: hidden;
}

/* 结果内容样式 */
.resultContent {
  padding: 16px;
  height: 100%;
  overflow-y: auto;
}

.resultInfo {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.testCaseResult {
  margin-top: 16px;
}

.testCaseTable {
  width: 100%;
}

.emptyResult {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #999;
}

.emptyIcon {
  font-size: 32px;
  margin-bottom: 16px;
  color: #999;
}

/* 加载状态 */
.loadingContainer {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100%;
  background-color: #fff;
  color: #555;
}

/* 确保按钮中的图标垂直居中 */
:global(.ant-btn) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

:global(.ant-btn .anticon) {
  display: flex;
  align-items: center;
  justify-content: center;
}

.actionButtonsContainer {
  display: none;
}

/* 表格样式优化 */
:global(.ant-table) {
  background-color: #fff;
  color: #333;
}

:global(.ant-table-thead > tr > th) {
  background-color: #f5f5fa !important;
  color: #333 !important;
  border-bottom: 1px solid #e8e8ed !important;
}

:global(.ant-table-tbody > tr > td) {
  border-bottom: 1px solid #e8e8ed !important;
}

:global(.ant-table-tbody > tr:hover > td) {
  background-color: #f9f9fb !important;
}

/* 标签样式优化 */
:global(.ant-tag-success) {
  background-color: #e3f5e1 !important;
  border-color: #7bc86c !important;
  color: #2b7d2b !important;
}

:global(.ant-tag-error) {
  background-color: #fce8e6 !important;
  border-color: #e57373 !important;
  color: #c62828 !important;
}

/* 下拉菜单样式优化 */
:global(.ant-select-selector) {
  background-color: #fff !important;
  border-color: #e8e8ed !important;
  color: #333 !important;
}

:global(.ant-select-dropdown) {
  background-color: #fff !important;
  border: 1px solid #e8e8ed !important;
}

:global(.ant-select-item) {
  color: #333 !important;
}

:global(.ant-select-item-option-selected) {
  background-color: #f5f5fa !important;
}

/* 调整器样式 */
.problemResizer {
  opacity: 0; /* 默认不可见 */
  transition: opacity 0.2s ease;
}

/* 当鼠标悬停在卡片容器上时，显示调整器 */
.cardsContainer:hover .problemResizer {
  opacity: 1;
}

/* 测试输入容器 */
.testInputContainer {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

.testInput {
  width: 100%;
  border-radius: 4px;
  resize: vertical;
  min-height: 80px;
}

.testButton {
  align-self: flex-end;
}

/* 测试结果样式 */
.testResultOutput {
  background-color: #f9f9f9;
  border-radius: 4px;
  padding: 12px;
  border: 1px solid #eee;
}

/* 提交结果样式 */
.submissionResultContent {
  padding: 16px;
  background-color: #f9f9f9;
  border-radius: 4px;
  border: 1px solid #eee;
}

.resultHeader {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eee;
}

.scoreLabel {
  font-size: 14px;
  color: #666;
}

.scoreValue {
  font-weight: bold;
  font-size: 16px;
  color: #1890ff;
}

.resultDetails {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 16px;
}

.resultItem {
  display: flex;
  align-items: center;
  gap: 8px;
}

.resultLabel {
  color: #666;
  font-size: 13px;
}

.resultInfo {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid #eee;
}

.resultInfoText {
  background-color: #f0f0f0;
  padding: 12px;
  border-radius: 4px;
  overflow: auto;
  max-height: 200px;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 12px;
  white-space: pre-wrap;
  margin: 0;
}

/* 空状态 */
.emptyResult {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: #999;
  text-align: center;
}

.emptyIcon {
  font-size: 28px;
  margin-bottom: 12px;
  color: #ccc;
}

/* 表格样式 */
.testCaseTable {
  margin-top: 12px;
}

/* 运行结果卡片标签样式 - 圆角矩形样式 */
.resultCard :global(.ant-tabs-nav) {
  margin-bottom: 0 !important;
}

.resultCard :global(.ant-tabs-tab) {
  margin: 0 4px 0 0 !important;
  padding: 8px 16px !important;
  background: #f0f0f0 !important;
  border: 1px solid #e8e8e8 !important;
  border-bottom: none !important;
  border-radius: 8px 8px 0 0 !important;
  transition: all 0.3s ease !important;
}

.resultCard :global(.ant-tabs-tab-active) {
  background: #ffffff !important;
  border-color: #e8e8e8 !important;
  border-bottom-color: #fff !important;
}

.resultCard :global(.ant-tabs-tab:hover) {
  background: #e8e8e8 !important;
}

.resultCard :global(.ant-tabs-tab-active:hover) {
  background: #ffffff !important;
}

.resultCard :global(.ant-tabs-tab .ant-tabs-tab-btn) {
  color: #595959 !important;
  font-weight: normal !important;
}

.resultCard :global(.ant-tabs-tab-active .ant-tabs-tab-btn) {
  color: #1890ff !important;
  font-weight: 500 !important;
}

.resultCard :global(.ant-tabs-ink-bar) {
  display: none !important;
}

.resultCard :global(.ant-tabs-content-holder) {
  border-top: 1px solid #e8e8e8 !important;
  background: #fff !important;
}

/* 提交记录样式 */
.submissionsContent {
  padding: 0;
  height: 100%;
  overflow: auto;
}

/* 确保表格在提交记录标签页内部正确显示 */
.submissionsContent :global(.ant-table-wrapper) {
  border-radius: 0;
  margin: 0;
  padding: 0;
}

.submissionsContent :global(.ant-table-thead > tr > th) {
  background-color: #f5f5f5;
  font-weight: 500;
}

.submissionsContent :global(.ant-table-tbody > tr.ant-table-row:hover > td) {
  background-color: #f0f7ff;
}

.submissionsContent :global(.ant-table-tbody > tr.ant-table-expanded-row > td) {
  padding: 16px 24px;
  background-color: #fafafa;
}

.submissionsContent :global(.ant-empty) {
  margin: 64px 0;
}

.loadingDot {
  display: inline-block;
  animation: loading 1.4s infinite;
}

@keyframes loading {
  0% { opacity: 0.2; }
  20% { opacity: 1; }
  100% { opacity: 0.2; }
}

.loadingPlaceholder {
  display: block;
  text-align: center;
  width: 100%;
  background: transparent;
} 